<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<%@ include file="/module/orderField.jsp"%>

<style>

table label.error {
    margin-left: 5px;
    width: auto;
    display: inline;
    color: red;
}


<style type="text/css">
.grid {
	font: 12px arial, helvetica, sans-serif;
	border: 1px solid #cccccc
}

.grid td {
	font: 100% arial, helvetica, sans-serif;
	height: 24px;
	padding: 5px
}

.grid {
	width: 100%;
	border-collapse: collapse
}

.grid th {
	background: #eeeeee;
	height: 27px;
	line-height: 27px;
	border: 1px solid #cccccc;
	padding-left: 5px
}

.grid td {
	border: 1px solid #cccccc;
	padding-left: 5px;
	text-align: center;
}

</style>
<script>
	$(document).ready(function(){
		//点击修改
		$("#btnUptContinue").click(function() {
			window.location.href="${basePath}/communityAmateurSchool/updateToview?id="+$("#dxid").val();
 		});
		
		//点击返回
		$("#btnBack").click(function() {
			document.Form.action ="${basePath}/communityAmateurSchool/index";
			document.Form.submit();
		});
		
	   	var data_canjia = JSON.parse('${deveAmateurSchoolStudentsJSON}');
		if(data_canjia!=null && data_canjia.length>0){
			drawTable("tpl_dy","stuTbody",data_canjia);
        }
			 
			
		
	});
	
	//输出表格数据
    function drawTable(tplId,table_id,data) {
        $("#"+table_id).html('');
        for(var k=0;k<data.length;k++){
            data[k].iindex = k;
            var html = template(tplId,data[k]);
            $("#"+table_id).html($("#"+table_id).html()+html);
        }
    }
				
	
</script>
</head>
<body>
     <form action="#" name="Form" id="Form" method="post">
       <input type="hidden" name="dxid" id="dxid"  value="${data.dxid}"/>
		<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%">
			<tr >
				<td class="table-header" colspan="4" style="text-align: center;">业余团校开展情况</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 15%">团校期数:</td>
				<td class="table-contentTD"  style="width: 35%">${data.dxqs}</td>
		
			    <td class="table-titleTD" style="width: 15%">授课主题:</td>
				<td class="table-contentTD">${data.skzt}</td>
			</tr>
			
			<tr>
				<td class="table-titleTD" style="width: 15%">授课时间:</td>
				<td class="table-contentTD">${data.sksj}</td>
		
			    <td class="table-titleTD" style="width: 15%">授课地点:</td>
				<td class="table-contentTD">${data.skdd}</td>
			</tr>
			 <tr>
				<td class="table-titleTD" style="width: 15%">计划参与人数:</td>
				<td class="table-contentTD">${data.jhcyrs}</td>
				
				<td class="table-titleTD" style="width: 15%">实际授课人数:</td>
				<td class="table-contentTD">${data.sjskrs}</td>
			</tr>
			 <tr>
				<td class="table-titleTD" style="width: 15%">创建人:</td>
				<td class="table-contentTD">${data.creatorname}</td>
			
				<td class="table-titleTD" style="width: 15%">创建时间:</td>
				<td class="table-contentTD"><fmt:formatDate value="${data.createtime}" pattern="yyyy-MM-dd"/></td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 15%">备注:</td>
				<td colspan="3" class="table-contentTD">${data.remark}</td>
			</tr>
			<tr>
				<td class="table-titleTD">附件：</td>
				<td class="table-contentTD" colspan="5">
					<table>
						<tr>
							<td colspan="2">
								<div id="uploadadd"></div>
							</td>
						</tr>
						<c:forEach items="${dataList}" var="datalist" varStatus="index">
							            <tr>
						                     <td>
									            [文件] ${datalist.filename}
									         </td>
									          <td>
									              <a href="${basePath}/DownLoadFileServlet?filename=${datalist.filename}&filepath=${datalist.filepath}">下载</a> 
					                          </td>
						                </tr>
						 </c:forEach>
					</table>
				</td>
			</tr>
			</br>
			<tr>
				<td colspan="4">
					<table class="grid">
						<thead>
							<tr>
								<th>序号</th>
								<th>姓名</th>
								<th>性别</th>
								<th>学号</th>
								<th>班级</th>
								<th>专业</th>
								<th>年级</th>
							</tr>
						</thead>
						<tbody id="stuTbody">

						</tbody>
					</table>
				</td>
			</tr>
		</table>
	</form>	
	</br>
	<table cellpadding="1" cellspacing="1" border="0" align="left">
			<tr>
			  <kl:permission permisstionList="${permisstionList}" currentUser="${_login_console_user}" currentCatalogId="<%=CatalogUtils.getCatalogId(\"ZHDJ_YYTX_TXGL\")%>" key="modify">			
				<td><input type="button" id="btnUptContinue" class="inputButton"
					style="text-align: center;" value="修改" /></td>
					</kl:permission>
				<td><input type="button" id="btnBack" class="inputButton"
					style="text-align: center;" value="返回" /></td>
			</tr>
		</table>
		
		<!-- 添加到学生表格stuTbody的内容 -->
	 <script id="tpl_dy" type="text/html">
        <tr id="tr_{{xsid}}">
            <td>{{iindex+1}}</td>
            <td>{{xm}}</td>
            <td>{{xb}}</td>
            <td>{{xh}}</td>
            <td>{{bjmc}}</td>
			<td>{{zymc}}</td>
            <td>{{njmc}}</td>
        </tr>
     </script>

</body>
</html>